﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Dyao.Book.Contract;
using Foundation.Entity;

namespace Dyao.Book.Entity
{
    [Table("OperationLog")]
    public class OperationLogEntity : IEntity
    {
        /// <summary>
        /// ID
        /// </summary>
        [Required]
        [Column("Id", TypeName = "VARCHAR")]
        [Key]
        public string ID { get; set; }

        /// <summary>
        /// 原编号
        /// </summary>
        [Required]
        public string SourceId { get; set; }

        /// <summary>
        /// 日志类型
        /// </summary>
        [Column("Type", TypeName = "VARCHAR")]
        [Required]
        public OperationTypeEnum OperationType { get; set; }

        /// <summary>
        /// 操作日志
        /// </summary>
        [Column("Content", TypeName = "NVARCHAR"), StringLength(1000)]
        public string OperationLog { get; set; }

        /// <summary>
        /// 用户名称
        /// </summary>
        [Required]
        public string CreateUserName { get; set; }

        /// <summary>
        /// 爬取时间
        /// </summary>
        [Required]
        public DateTime CreateDateTime { get; set; }
    }
}
